﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IRC.IRepairClouds.DataLayer
{
    public class PathInfo
    {
        public PathType Type { get; private set; }
        public string Path { get; private set; }

        public PathInfo()
        {
        }

        public PathInfo(string path)
        {
            if (path.StartsWith("http://")) {
                Type = PathType.Http;
                Path = path.Substring(7);
            }
            else if (path.StartsWith("file://")) {
                Type = PathType.File;
                Path = path.Substring(7);
            }
            else {
                throw new NotSupportedException();
            }
        }
    }
}
